//
//  UIImage+KYKJ.m
//  KYAdvertSDK
//
//  Created by 罗新 on 2017/4/24.
//  Copyright © 2017年 蔡正军. All rights reserved.
//

#import "UIImage+KYKJ.h"

@implementation UIImage (KYKJ)
+ (instancetype)ky_imageWithColor:(UIColor *)color{
    CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f);
    UIGraphicsBeginImageContext(rect.size);
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSetFillColorWithColor(context, [color CGColor]);
    CGContextFillRect(context, rect);
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();    UIGraphicsEndImageContext();
    return image;
}
@end
